import { createRouter, createWebHashHistory } from "vue-router";
const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            path: "/",
            redirect: {
                name: "Index",
            }
        },
        {
            path: "/Login",
            name: "Login",
            component: () => import("../views/Login.vue"),
            meta: {
                title: "登录",
            }
        },
        {
            path: "/Register",
            name: "Register",
            component: () => import("../views/Register.vue"),
            meta: {
                title: "注册",
            }
        },
        {
            path: "/Attention",
            name: "Attention",
            component: () => import("../views/Attention.vue"),
            meta: {
                title: "Attention",
            }
        },
        {
            path: "/Index",
            name: "Index",
            component: () => import("../views/Index.vue"),
            meta: {
                title: "首页",
            }
        },
        {
            path: "/UserCenter",
            name: "UserCenter",
            component: () => import("../views/UserCenter/UserInfo.vue"),
            meta: {
                title: "个人中心",
            }
        },
        {
            path: "/MessageInfo",
            name: "MessageInfo",
            component: () => import("../views/Message/MessageInfo.vue"),
            meta: {
                title: "留言板",
            }
        },
        {
            path: "/ProductInfo",
            name: "ProductInfo",
            component: () => import("../views/Product/ProductInfo.vue"),
            meta: {
                title: "产品",
            }
        }, {
            path: "/goodsDetail/:id",
            name: "goodsDetail",
            component: () => import("../views/Product/goodsDetail.vue"),
            meta: {
                title: "商品详情"
            }
        },
        {
            path: "/NewInfo",
            name: "NewInfo",
            component: () => import("../views/New/NewInfo.vue"),
            meta: {
                title: "新闻",
            }
        },
        {
            path: "/Share",
            name: "Share",
            component: () => import("../views/ShareCenter/Share.vue"),
            meta: {
                title: "分享中心",
            }
        },
        {
            path: "/Shopcart",
            name: "Shopcart",
            component: () => import("../views/Shopcart/shopcart.vue"),
            meta: {
                title: "我的订单",
            }
        },
        {
            path: "/Order",
            name: "Order",
            component: () => import("../views/Order/list.vue"),
            meta: {
                title: "我的订单",
            }
        },
    ]
})
export default router;